Skip to content

fix(lanes): up --workers runs the workers of a lane on a node too (#314) - #321

Merged
7schmiede merged 2 commits into
mainfrom
fix/314-workers-on-node
Oct 27, 2026
Merged

7schmiede merged 2 commits into
mainfrom
fix/314-workers-on-node

Conversation

@7schmiede

Copy link
Copy Markdown
Member

Fixes #314.

Cause

--workers set lane_workers on a local lane's supervisor only (api.rs). For a lane on a node it was never sent: neither the lease nor the node's start knew it, so the lane's daemon there decided workers by the main slot alone (owns_main() = REMOTE_MAIN), {is_main} was false, and jobs stayed queued, with nothing saying so.

Fix

  • Transport: activate_remote(.., workers) keeps it in Lanes::workers; with_spec puts it in RemoteSpec::workers → NodeClient::start(.., workers, ..) → the node's Start.workers (serde default, skipped when false) → LaneRun.workers → -e DEVSTACK_LANE_WORKERS=1 on the lane container.
  • Daemon on the node (lib.rs): a remote lane sets lane_workers from its profile's workers, else from DEVSTACK_LANE_WORKERS, as api.rs does for a local lane.
  • Kept: a move to a node takes the local lane's setting; a move back applies it; a restart carries it (CarriedLane.workers, also for local lanes, which lost it before). Cleared when the lane stops.
  • Visible: LaneView.workers; devstack lane list notes "runs its background workers".
  • Older node: an agent before 0.25.1 ignores the field, so the lease warns (node_warning) that the lane starts without its workers and that --on local runs them.
  • Running lane: up --workers on a lane that runs already notes that it applies at its next start, now also on a node.

Tests

  • remote_lane.rs (CI job remote-lane, Linux node): the first start reports "workers":false on /info; after lane reset, up --workers --on ci-node reports "workers":true and lane list names it.
  • cargo test devstack, devstack-daemon, devstack-node; clippy clean; ui typecheck.

🤖 Generated with Claude Code

7schmiede and others added 2 commits October 27, 2026 17:56
…314)

The flag never left this machine: the lane's daemon on the node ran
without `lane_workers`, so `{is_main}` stayed false and jobs stayed
queued with nothing saying so.

- `--workers` goes with the start: `Lanes::workers`, `RemoteSpec::workers`,
  the node's `Start.workers`, `DEVSTACK_LANE_WORKERS=1` in the lane
  container; the daemon there sets it (or its profile's `workers`).
- It stays with the lane on a move (both ways) and across a restart
  (`CarriedLane.workers`, local lanes too).
- `LaneView.workers`; `lane list` names lanes that run their workers.
- A node before 0.25.1 does not take it: the start warns.
- `up --workers` on a lane that runs already says it applies at its
  next start, on a node as here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit dd25b0e into main Oct 27, 2026
13 checks passed
@7schmiede
7schmiede deleted the fix/314-workers-on-node branch October 27, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

up --workers does not enable workers when the lane runs on a pool node

1 participant